const app=getApp();
Page({
  data:{
    array:''
  },
  getdata(){
    var dataobj=[
      {img:'buxing.jpg'},
      {img:'gongjiaoche.jpg'},
      {img:'zixingche.jpg'},
    ]
    var num=Math.floor(Math.random()*3)
    var obj=dataobj[num]
    console.log(obj)
    this.setData({array:obj})
  },
// 显示遮罩层
onLoad: function(options) {
  this.donghua=wx.createAnimation({
   duration:1500
  })
  this.getdata();
  console.log(this.data.array)
},
onShow:function(options){
  this.translate()
  console.log(1111)
},
translate: function() {
  this.donghua.translate(0,-650).step()
  this.setData({
    donghua:this.donghua.export()
  })
  console.log(22)
},

})